import {
	useStore
} from 'vuex'

export default function useUserMutations(userInfo) {
	const store = useStore()

	const setUserInfo = (userInfo) => {
		store.commit('updateUserInfo', userInfo)
	}

	const clearUserInfo = () => {
		store.commit('updateUserInfo', null)
	}

	return {
		setUserInfo,
		clearUserInfo
	}
}